package com;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.netflix.zuul.filters.discovery.PatternServiceRouteMapper;
import org.springframework.context.annotation.Bean;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/6/14 0:35
 * @since JDK 1.8
 */
@SpringCloudApplication
@EnableZuulProxy
@EnableEurekaClient
public class ZuulApplication {


    //http://localhost:8084/test/provider  没开启访问
    //http://localhost:8089/feign-provider/test/provider
    //http://localhost:8089/feign/test/provider
    public static void main(String[] args) {
        SpringApplication.run(ZuulApplication.class, args);
    }

//    @Bean
//    public PatternServiceRouteMapper patternServiceRouteMapper(){
//        return new PatternServiceRouteMapper("(?<name>.*)-service","${name}");
//    }

}
